package com.persondemo.videoappliction.net;

import com.persondemo.videoappliction.bean.DelteShopBean;
import com.persondemo.videoappliction.bean.DetilsBean;
import com.persondemo.videoappliction.bean.DianPingBean;
import com.persondemo.videoappliction.bean.DianPingChoiceBean;
import com.persondemo.videoappliction.bean.DianPingDetilsBean;
import com.persondemo.videoappliction.bean.DuanziBean;
import com.persondemo.videoappliction.bean.GooleAdBean;
import com.persondemo.videoappliction.bean.HFBean;
import com.persondemo.videoappliction.bean.HotSearchBean;
import com.persondemo.videoappliction.bean.MainBean;
import com.persondemo.videoappliction.bean.MeCollectBean;
import com.persondemo.videoappliction.bean.MeShopBean;
import com.persondemo.videoappliction.bean.PersonSettingBean;
import com.persondemo.videoappliction.bean.PingLunBean;
import com.persondemo.videoappliction.bean.PuShopBean;
import com.persondemo.videoappliction.bean.PutBean;
import com.persondemo.videoappliction.bean.PutShopTypeBean;
import com.persondemo.videoappliction.bean.SearchBean;
import com.persondemo.videoappliction.bean.ShengtieBean;
import com.persondemo.videoappliction.bean.ShopDetilsBean;
import com.persondemo.videoappliction.bean.SplashBean;
import com.persondemo.videoappliction.bean.TvMovieBean;
import com.persondemo.videoappliction.bean.UpPingCeBean;
import com.persondemo.videoappliction.bean.UpdataBean;
import com.persondemo.videoappliction.bean.UpimgBean;
import com.persondemo.videoappliction.bean.UseInfoBean;
import com.persondemo.videoappliction.bean.VideoBean;
import com.persondemo.videoappliction.bean.VipBean;
import com.persondemo.videoappliction.bean.VipSeachBean;
import com.persondemo.videoappliction.bean.WaiVideBean;
import com.persondemo.videoappliction.bean.ZanCaiBean;
import com.persondemo.videoappliction.bean.ZiXunBean;

import io.reactivex.Observable;
import okhttp3.MultipartBody;

/**
 * Created by Administrator on 2018/3/19.
 */

public class BaseApi {
    public static final String sIFengApi = "http://vip.axiaodao.com/";
    public static final String touxiang = " http://vip.axiaodao.com/public/touxiang.jpg/";
    public static BaseApi sInstance;
    private VideoApiService mService;

    public BaseApi(VideoApiService mService) {
        this.mService = mService;
    }

    public static BaseApi getInstance(VideoApiService videoApiService) {
        if (sInstance == null)
            sInstance = new BaseApi(videoApiService);
        return sInstance;
    }

    public Observable<MainBean> getmaindatas(String imei) {
        return mService.getMaindata(imei);
    }

    public Observable<VideoBean> getvideodata(int id) {
        return mService.getdetilsdata(id);
    }

    public Observable<SearchBean> getserach(String title) {
        return mService.getsearchdata(title);
    }

    public Observable<TvMovieBean> getdatas(String type, String types, String city, String ages, String page) {
        return mService.getdatas(type, types, city, ages, page);
    }

    public Observable<WaiVideBean> getwaidata(String key) {
        return mService.getwaidata(key);
    }

    public Observable<SplashBean> getlogo() {
        return mService.getlogoldata();
    }

    public Observable<VipBean> getvip(String imei) {
        return mService.getvip(imei);
    }

    public Observable<UpdataBean> updata() {
        return mService.updata();
    }

    public Observable<VipSeachBean> seachvip(String key, int page) {
        return mService.getvipsearch(key, page);
    }

    public Observable<HotSearchBean> fragmentbiaoqian(String key, int page) {
        return mService.fragmentsearch(key, page);
    }

    public Observable<DuanziBean> getduanzi(String type, String page, String id) {
        return mService.getduanzidata(type, page, id);
    }

    public Observable<DetilsBean> getdetils(String ids) {
        return mService.getdetilsdata(ids);
    }

    public Observable<PingLunBean> getpinlundata(String ids, String pages) {
        return mService.getpinglun(ids, pages);
    }

    public Observable<ZanCaiBean> getinfor(String id, String type, String device) {
        return mService.getforation(id, type, device);
    }

    public Observable<HFBean> getHf(String ids, String content, String device, String mid) {
        return mService.hfdata(ids, content, device, mid);
    }

    public Observable<UpimgBean> upimgdata(MultipartBody.Part file) {
        return mService.upimg(file);
    }

    public Observable<UpimgBean> upimgdata_pingce(MultipartBody.Part file) {
        return mService.upimg_pingce(file);
    }

    public Observable<PersonSettingBean> personsetting(String imgs, String username, int sex, String device, String email, String password) {
        return mService.upseting(imgs, username, sex, device, email, password);
    }

    public Observable<UseInfoBean> geinfo(String device) {
        return mService.geinfo(device);
    }

    public Observable<PutBean> putdatas(String comment, String device, String img, String type) {
        return mService.putdata(comment, device, img, type);
    }

    public Observable<MeCollectBean> getcollect(String device, String page) {
        return mService.getmecoll(device, page);
    }

    public Observable<ShengtieBean> getshengtie(String device, String page) {
        return mService.getshengtie(device, page);
    }

    public Observable<DianPingChoiceBean> getchoice(String city) {
        return mService.getchoice(city);
    }

    public Observable<DianPingBean> getpingce(String xlocation, String ylocation, String type, String key
            , String paid, String page, String xid, String city) {
        return mService.getpingce(xlocation, ylocation, type, key, paid, page, xid, city);
    }

    public Observable<ShopDetilsBean> getshop(String id) {
        return mService.getshops(id);
    }

    public Observable<DianPingDetilsBean> getdianping(String id, String page, String type) {
        return mService.getdianping(id, page, type);
    }

    public Observable<UpPingCeBean> uppingce(String ids, String content, String device, String imgs, String star) {
        return mService.uppingce(ids, content, device, imgs, star);
    }

    public Observable<MeShopBean> meshops(String device, String page) {
        return mService.meshop(device, page);
    }

    public Observable<PuShopBean> putshops(String title, String shangquan, String renjun, String phone, String business
            , String address, String imgs, String type, String device) {
        return mService.putshop(title, shangquan, renjun, phone, business, address, imgs, type, device);
    }

    public Observable<PutShopTypeBean> gettype() {
        return mService.gettype();
    }

    public Observable<DelteShopBean> delteshop(String device, String id) {
        return mService.deltebean(device, id);
    }
    public Observable<ZiXunBean> getzixun(String page){
        return  mService.getzixun(page);
    }
    public Observable<GooleAdBean> getad(){
        return  mService.getad();
    }
}
